﻿using System;
using System.Collections.Generic;

namespace Terraria.ModLoader
{
	// Token: 0x020001FD RID: 509
	public static class NPCSpawnHelper
	{
		// Token: 0x06001642 RID: 5698 RVA: 0x00414A94 File Offset: 0x00412C94
		internal static void Reset()
		{
			foreach (SpawnCondition spawnCondition in NPCSpawnHelper.conditions)
			{
				spawnCondition.Reset();
			}
		}

		// Token: 0x06001643 RID: 5699 RVA: 0x00414AE8 File Offset: 0x00412CE8
		internal static void DoChecks(NPCSpawnInfo info)
		{
			float value = 1f;
			foreach (SpawnCondition spawnCondition in NPCSpawnHelper.conditions)
			{
				spawnCondition.Check(info, ref value);
				if ((double)Math.Abs(value) < 5E-06)
				{
					break;
				}
			}
		}

		// Token: 0x0400153E RID: 5438
		internal static List<SpawnCondition> conditions = new List<SpawnCondition>();
	}
}
